<?php

namespace app\common\model\jooj_member;

/**
 * 根据company_id生成对应的数据表
 *
 * @author jiang.ding
 */
class MemberFaceGrant extends FaceRecognitionBase {

    protected $base_table = 'jj_member_face_grant';
    protected $table = 'jj_member_face_grant';
    protected $connection = ['database' => 'jooj_member'];

    /**
     * 初始化方法
     * @param type $companyId
     */
    public function __construct($companyId = []) {
        if (!is_array($companyId)) {
            $this->table = $this->base_table . '_' . $companyId;
            
            # 判断表是否已经存在,若不存在则创建
            $this->createTable($this->table,$this->base_table);
            
        }
        parent::__construct($companyId);
    }

}
